package D2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2024-05-16
 * Time: 11:37
 */
    public class PillarTest220054070111 {
        public static void main(String[] args) {
            Circle c1 = new Circle(1);
            Pillar p1 = new Pillar(2,c1);
            System.out.println("圆柱的体积是："+p1.getVolume());
            System.out.println(p1);
            Rectangle rec = new Rectangle(1,2);
            Pillar p2 = new Pillar(3,rec);
            System.out.println("方柱的体积是"+p2.getVolume());
            System.out.println(p2);
        }
    }

